<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Charge</title>
</head>
<style>
    * {
        margin: 0px;
        padding: 0px;
        box-sizing: border-box;
    }
    body {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #333;
    }
    .battery {
        position: relative;
        width: 200px;
        height: 350px;
        background-color: white;
        /* 圆角 */
        border-radius: 20px;
    }
    .battery::before {
        content: "";
        position: absolute;
        left: 90px;
        top: -10px;
        width: 20px;
        height: 10px;
        background-color: white;
        border-radius: 3px 3px 0px 0px;
    }
    .battery::after {
        content: "";
        position: absolute;
        left: 0px;
        bottom: 0px;
        top: 95%;
        width: 100%;
        background: red;
        background: linear-gradient(to bottom, #7abcff 0%, #00bcd4 50%, #2196f3 100%);
        animation: charge 10s linear infinite;
        border-radius: 0 0 20px 20px;
    }
    @keyframes charge {
        0% {
            top: 95%;
            filter: hue-rotate(90deg);
        }

        95% {
            top: 5%;
            border-radius: 0px 0px 20px 20px;
        }

        100% {
            top: 0%;
            border-radius: 20px;
            filter: hue-rotate(0deg);
        }
    }
    .cover {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0px;
        top: 0px;
        z-index: 1;
        overflow: hidden;
        border-radius: 20px;
    }
    .cover::before {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        background: rgba(255, 255, 255, .8);
        border-radius: 40% 30%;
        left: -50%;
        animation: coverBefore 10s linear infinite;
    }
    .cover::after {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        background: rgba(255, 255, 255, .7);
        border-radius: 45% 40%;
        left: -50%;
        animation: coverAfter 10s linear infinite;
    }
    @keyframes coverBefore {
        0% {
            transform: rotate(0deg);
            bottom: 0%;
        }

        100% {
            transform: rotate(360deg);
            bottom: 98%;
        }
    }
    @keyframes coverAfter {
        0% {
            transform: rotate(30deg);
            bottom: 0%;
        }

        100% {
            transform: rotate(360deg);
            bottom: 98%;
        }
    }
</style>

<body>
    <div class="battery">
        <div class="cover"></div>
    </div>
</body>

</html>